﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BadHabit.Factory.Controls {
    /// <summary>
    /// Interaction logic for BurnDownPanel.xaml
    /// </summary>
    public partial class BurnDownPanel : GenericPanel {

        public BurnDownPanel() {
            InitializeComponent();
        }

     
                
        private void SetCurrentSprintToShow() {
            if (Project == null)
                return;
            if (Project.CurrentSprint!=null)
                BurnDownGraph.ShowOnlySprint = Project.CurrentSprint.SprintNumber;
            else
                BurnDownGraph.ShowOnlySprint = 0;
        }

      

        private void wholeProjectButton_Click(object sender, RoutedEventArgs e) {
            if (Project == null)
                return;
            BurnDownGraph.ShowOnlySprint = 0;
        }

        private void burnDownPanel_Loaded(object sender, RoutedEventArgs e) {
            if (BurnDownGraph != null)
                BurnDownGraph.RenderGraph();
        }

      
    }
}
